import logging
from config.config import load_config
from parser.parser import RSSParser

def main():
    fnsa_news_manager_config, etcd_host, etcd_port, parse_only_new_items, cut_off_seconds = load_config()
    
    logging.basicConfig(level=logging.INFO)
    logger = logging.getLogger(__name__)
    logger.info("Starting RSS parser service")
    
    parser = RSSParser(fnsa_news_manager_config, etcd_host, etcd_port, parse_only_new_items, cut_off_seconds)
    parser.run()

if __name__ == "__main__":
    main()
